Project 131: Artillery! Turrets Concept Test

 This is a proof of concept of the turret system for the game "Artillery!" which I am working on. This is based on the TurretShape code already present in T3D, however my implementation has to ability to accept rotation and elevation commands from script, and smoothly interpolate the current turret position to the new position with no jitter or sudden movements.

Turrets are also made in a single file. The turret feature in T3D has a turret body, which is then mounted with a separate "head" object. This head object is defined as a weapon, (A ShapeImage) and can feature and advanced state machine to drive animations. My game didn't need that feature, since the firing calculations will be handled from separate functions (to better simulate different types of physical effects and types of shot) and so I modified the code to allow the turret to be modelled as a single shapefile.

Constructing a turret is relatively simple. Two nodes are required, a "heading" node to control rotation, and a "pitch" node to control elevation, as well as a "Muzzlepoint" to determine the position that the projectile leaves the gun. Any object linked to the heading node is rotated, and any object linked to the pitch node is elevated, so, a simple turret might have a base, which is unlinked so that it doesn't move, and then a mount which is linked to the heading node only, and a gun barrell which is linked to the heading and pitch nodes.

Modelling and animating should be simpler in a single shape file, and I won't have to worry about getting mount points to line up exactly, or have to work with offsets.

This solution works over the network, although not properly. I had to add some script commands to ensure proper animations, and this should not have been neccessary, I intend to properly debug and fix this at a later stage.

 


You must be a member of this blog to see the comments. Log in now!